{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "d5cf3e7a-07b1-4ec3-9674-667747e2319e",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Job Requisition ID  . predisposition OverviewAutodesk  Customer Experience (CX) Analytics team is looking for a \n",
      "passionate and driven Data Analyst with proven experience driving organizational change through rigorous data \n",
      "analysis. This role will perform deep data mining and statistical behavioral analysis of Autodesk  customer data \n",
      "and will partner with internal business stakeholders to refine key success measures and find insights to drive \n",
      "program efficiency. They will play a significant role in shaping a customer-focused and data-driven culture. Join a\n",
      "dynamic team that is helping to transform business decisions and processes with actionable customer insights gained\n",
      "from meaningful research, analysis and measurement of the Autodesk customer experience. Job Title:Lead Business \n",
      "Intelligence AnalystLocation: San Francisco, Irresponsibility collaboratively and cross functionally to define and \n",
      "meet stakeholder requirements Translate business objectives into technical data requirements and balance them with \n",
      "technical feasibility, recommending changes in development, maintenance and platform standards as necessary Perform\n",
      "deep dive analyses to understand trends, anomalies and insights that will drive operational improvements Craft data\n",
      "stories through presentations, written summaries, and data visualizations that accurately outline problem \n",
      "statements and provide actionable and unbiased intelligence and recommendations Communicate findings from \n",
      "initiatives with clarity and accountability to the broader organization or stakeholdersClearly document provenance of \n",
      "data, ETL logic, and code used to develop models Proactively identify areas in which analytics efforts can answer \n",
      "business questions, drive operational improvements and business value Spearhead the development of insight-driven \n",
      "tools and dashboards and provide ongoing support regarding functionality and \n",
      "data-integrityMinimumRequirementsProficiency using SQL to query large proficiency with Google Analytics and or  \n",
      "Adobe Analyticalally experience with Microsoft Excel (pivot tables, advanced modeling, creating charts or graphs) and \n",
      "PowerPoint with BI development and database systems such as PowerBI, Looker and Tableau Experience with scripting \n",
      "languages such as R, Python or equivalent Experience with Qubole, Snowflake or equivalent The Ideal Candidate \n",
      "Extensive experience in roles combining data analysis or business intelligence, research and strategy Strong \n",
      "problem-solving skills and sharp business judgmentData-curious, interested in telling the story behind the \n",
      "dataDetail-oriented, ensuring data accuracy and consistency Exceptional communication skills, attentive listener \n",
      "and compelling influence to new ideas and respectful of differing opinions or perspectivesAddresses difficult problems\n",
      "head-on and challenges the status quo Can adapt to change and is open to learning new skillsSelf-motivated and can \n",
      "work independently in a fast-paced environment Highly collaborative and can work cross-functionally, while \n",
      "cultivating relationships with colleagues and stakeholders Passionate about improving the customer experience Click\n",
      "below to learn more about our benefits in the US.At Autodesk, we're building a diverse workplace and an inclusive \n",
      "culture to give more people the chance to imagine, design, and make a better world. Autodesk is proud to be an \n",
      "equal opportunity employer and considers all qualified applicants for employment without regard to race, color, \n",
      "religion, age, sex, sexual orientation, gender, gender identity, national origin, disability, veteran status or any\n",
      "other legally protected characteristic. We also consider for employment all qualified applicants regardless of \n",
      "criminal histories, consistent with applicable law. Are you an existing contractor or consultant with Autodesk? . \n",
      "Please search for open jobs and apply internally (not on this external site). If you have any questions or require \n",
      "support, contact Autodesk Careers. Salary is one part of Autodesk  competitive package. For U.S.-based roles, we \n",
      "expect a starting base salary dollar109500 - dollar187770. Offers are based on the candidate  experience and \n",
      "geographic location, and may exceed this range. In addition to base salaries, we also have a significant emphasis \n",
      "on annual cash bonuses, commissions for sales roles, stock grants, and a comprehensive benefits package. \n",
      "SummaryLocation:San Francisco, California, USAType: Full timescale .Summar  The Business Analyst I possesses the fundamentals of analytical, strategic and project management skills. \n",
      "They need to have strong initiative, communication, and organizational skills to manage multiple project timelines.\n",
      "The Business Analyst I will support all business areas by bridging the technical knowhow with the operational \n",
      "expertise of the business owners. This position is key to understanding and documenting capabilities needed to \n",
      "address business challenges with technical solutions. The Business Analyst I will assist in requirements \n",
      "development by reviewing business processes and systems to identify and address operational efficiencies and \n",
      "improvements. This position will act as the liaison among internal business and technical stakeholders to analyze, \n",
      "document, communicate and validate business and system requirements for platform applications. Other duties as \n",
      "assigned. Business Analyst I: The Business Analyst I will act in a support role and be given project tasks, as \n",
      "overseen by the project lead. Reporting will be given at limited complexity as this role continues to build their \n",
      "familiarity with our business and data structure. Work is closely managed by the Business Intelligence Manager. \n",
      "Essential Duties and Responsibilities:Business Analyst I: Gather, organize, and create an execution plan for \n",
      "business and data requirements . Create reports, dashboards, and visualizations to understand business performance \n",
      ". Manage the day-to-day functions of data export jobs . Manage the cleanliness of master data and provide \n",
      "opportunities for training and better efficiencies . Recognize and adopt best practices in reporting and analysis: \n",
      "data integrity, test design, analysis, validation, and documentation . Coach, demonstrate, and uphold Friedman  \n",
      "Core Values . Maintain regular and dependable attendance and punctuality . Education or Experience: Minimum of 1-3 \n",
      "years business or data analytics experience . Bachelor  degree in a related field such as Data Science, Business \n",
      "Analytics, Statistics, Business Management, Economics, or Computer Science . ITIL or a Business Analyst \n",
      "Certification, a plus . Knowledge, Skills and Abilities: Intermediate Microsoft Suite, Word, Excel and PowerPoint \n",
      "Skills . Experience with reporting tools such as Power Bi . Ability to multitask across multiple lines and daily \n",
      "tasks . Experience working with ERP systems, such as Dynamics AX, D365 for F&O, Nav, a plus . Active listener with \n",
      "strong verbal and written communication skills . Self-starter who takes initiative . Detail-oriented and highly \n",
      "organized . Strong planning and strategic thinking . High Energy, Driven, Positive Attitude . Eagerness to learn, \n",
      "map and improve business processes . Excellent time management skills with a proven ability to meet deadlines and \n",
      "multi-task . Ability to work both independently and as part of a team, take initiative, and be proactive . Reliable\n",
      "work habits; accurate, efficient, proactive, and self-motivated . Strong organizational skills and detail-oriented \n",
      "with ability to prioritize multiple assignments . Dependable time management skills with the ability to and handle \n",
      "simultaneous tasks and responsibilities . Effectively respond to all situations using sound judgement and \n",
      "decision-making skills . What  in Friedman  toolbox for Team Members: 401k match up to 3% and 50 cents on the \n",
      "dollar for any amount greater than 3% up to 5% Medical, Dental and Vision bundled benefit plan . Team Member \n",
      "discount on all merchandise . Casual dress code . Tuition reimbursement to further career path . Friedman  Home \n",
      "Improvement is proud to be an Equal Opportunity Employer, committed to a diverse and inclusive work environment. \n",
      "Friedman  Home Improvement will consider for employment qualified applicants with criminal convictions in a manner\n",
      "consistent with AB 1008.SDL2017 .\n"
     ]
    }
   ],
   "source": [
    "# -*- encoding: utf-8 -*-\n",
    "# @Time       :  1:35\n",
    "# @Author     : yuxian\n",
    "# @Email      : 1503889663@qq.com\n",
    "# @File       : 正则文本清洗.py\n",
    "# @SoftWare   : PyCharm\n",
    "import re\n",
    "\n",
    "\n",
    "def clean_cleaned_text(cleaned_text):\n",
    "    # 去掉 `*、(s)、's、 - 、`\n",
    "    cleaned_text = re.sub(\"[*]|\\(s\\)|\\'s|\\s+-\\s+\", \" \", cleaned_text)\n",
    "    # 去掉 `/> 、`\n",
    "    cleaned_text = re.sub(\"/>|Zone\\s+\\d+(:)?|phone:|[TTYtty]:\",\" \",cleaned_text)\n",
    "    \n",
    "    # /\n",
    "    def rule1(patter):\n",
    "        matched_string = patter.group(0)\n",
    "        return matched_string.replace(\"/\", \" per \")\n",
    "\n",
    "    cleaned_text = re.sub(\"day(s)?/week|\\d+(\\s)?/year(s)?\", rule1, cleaned_text)\n",
    "    cleaned_text = re.sub(\"\\s+/\\s+\", \"/\", cleaned_text)\n",
    "\n",
    "    def rule2(patter):\n",
    "        matched_string = patter.group(0)\n",
    "        matched_string = re.sub(\"/[Oo][Rr]\", \"/\", matched_string)\n",
    "        return matched_string.replace(\"/\", \" or \")\n",
    "\n",
    "    cleaned_text = re.sub(\"[A-Za-z]+/[A-Za-z]+\", rule2, cleaned_text)\n",
    "    cleaned_text = re.sub(\"[A-Za-z]+/\\d+\", rule2, cleaned_text)\n",
    "    cleaned_text = re.sub(\"\\d+/[A-Za-z]+\", rule2, cleaned_text)\n",
    "\n",
    "    # &\n",
    "    cleaned_text = re.sub(\"\\s+&(\\s)?\",\" and \", cleaned_text)\n",
    "    # |\n",
    "    clean_cleaned_text = re.sub(\"|\",\"; \",cleaned_text)\n",
    "    \n",
    "    # 美元\n",
    "    def rule3(patter):\n",
    "        matched_string = patter.group(0)\n",
    "        if \".\" in matched_string:\n",
    "            if int(matched_string.split(\".\")[-1]) <= 0:\n",
    "                matched_string = re.sub(\"\\.\\d+\",\" \",matched_string)\n",
    "            \n",
    "        matched_string = matched_string.replace(\"between\", \"\").replace(\"and\", \"-\")\n",
    "        return matched_string.replace(\",\", \"\").replace(\" \", \"\").replace(\"$\", \"dollar\").replace(\"-\", \" - \")+\" \"\n",
    "\n",
    "    cleaned_text = re.sub(\"\\$\\d+(,)?\\d+(\\.)?\\d+(\\s)?-(\\s)?\\$\\d+(,)?\\d+(\\.)?\\d+\", rule3, cleaned_text)\n",
    "    cleaned_text = re.sub(\"\\$\\d+(,)?\\d+(\\.)?\\d+(\\s)?to(\\s)?\\$\\d+(,)?\\d+(\\.)?\\d+\", rule3, cleaned_text)\n",
    "    cleaned_text = re.sub(\"between\\s+\\$\\d+(,)?\\d+(\\.)?\\d+(\\s+)?and(\\s+)?\\$\\d+(,)?\\d+(\\.)?\\d+\", rule3, cleaned_text)\n",
    "    clean_cleaned_text = re.sub(\"\\$\\d+(,)?\\d+(\\.)?\\d+(\\s)?\",rule3,cleaned_text)\n",
    "    cleaned_text = re.sub(\"USD\", \"dollar\", cleaned_text)\n",
    "\n",
    "    # 其它特殊\n",
    "    cleaned_text = re.sub(\"401\\(k\\)\", \"401k\", cleaned_text)\n",
    "    cleaned_text = re.sub(\"#.*?\\s|@.*?\\s|\\[\\s+[Ll]ink\\s+removed\\s+]|\\(\\d+\\)|\\[\\s+Email\\s+address\\s+blocked\\s+]\", \" \", cleaned_text)\n",
    "    cleaned_text = re.sub(\"San Francisco(,)\\s+CA\",\"San Francisco, California\", cleaned_text)\n",
    "\n",
    "    def rule4(patter):\n",
    "        matched_string = patter.group(0)\n",
    "        digit = re.findall(\"\\d+\",matched_string)[0]\n",
    "        \n",
    "        return digit+\" \"+matched_string.split(digit)[-1]\n",
    "        \n",
    "    cleaned_text = re.sub(\"\\d+[a-zA-Z]{3}\",rule4,cleaned_text)\n",
    "    return cleaned_text\n",
    "\n",
    "\n",
    "if __name__ == '__main__':\n",
    "    str1 = \"\"\"Job Requisition ID # . predisposition OverviewAutodesk's Customer Experience (CX) Analytics team is looking for a \n",
    "passionate and driven Data Analyst with proven experience driving organizational change through rigorous data \n",
    "analysis. This role will perform deep data mining and statistical behavioral analysis of Autodesk's customer data \n",
    "and will partner with internal business stakeholders to refine key success measures and find insights to drive \n",
    "program efficiency. They will play a significant role in shaping a customer-focused and data-driven culture. Join a\n",
    "dynamic team that is helping to transform business decisions and processes with actionable customer insights gained\n",
    "from meaningful research, analysis and measurement of the Autodesk customer experience. Job Title:Lead Business \n",
    "Intelligence AnalystLocation: San Francisco, Irresponsibility collaboratively and cross functionally to define and \n",
    "meet stakeholder requirements Translate business objectives into technical data requirements and balance them with \n",
    "technical feasibility, recommending changes in development, maintenance and platform standards as necessary Perform\n",
    "deep dive analyses to understand trends, anomalies and insights that will drive operational improvements Craft data\n",
    "stories through presentations, written summaries, and data visualizations that accurately outline problem \n",
    "statements and provide actionable and unbiased intelligence and recommendations Communicate findings from \n",
    "initiatives with clarity and accountability to the broader organization/stakeholdersClearly document provenance of \n",
    "data, ETL logic, and code used to develop models Proactively identify areas in which analytics efforts can answer \n",
    "business questions, drive operational improvements and business value Spearhead the development of insight-driven \n",
    "tools & dashboards and provide ongoing support regarding functionality and \n",
    "data-integrityMinimumRequirementsProficiency using SQL to query large proficiency with Google Analytics and/or \n",
    "Adobe Analyticalally experience with Microsoft Excel (pivot tables, advanced modeling, creating charts/graphs) and \n",
    "PowerPoint with BI development and database systems such as PowerBI, Looker and Tableau Experience with scripting \n",
    "languages such as R, Python or equivalent Experience with Qubole, Snowflake or equivalent The Ideal Candidate \n",
    "Extensive experience in roles combining data analysis/business intelligence, research and strategy Strong \n",
    "problem-solving skills and sharp business judgmentData-curious, interested in telling the story behind the \n",
    "dataDetail-oriented, ensuring data accuracy and consistency Exceptional communication skills, attentive listener \n",
    "and compelling influence to new ideas and respectful of differing opinions/perspectivesAddresses difficult problems\n",
    "head-on and challenges the status quo Can adapt to change and is open to learning new skillsSelf-motivated and can \n",
    "work independently in a fast-paced environment Highly collaborative and can work cross-functionally, while \n",
    "cultivating relationships with colleagues and stakeholders Passionate about improving the customer experience Click\n",
    "below to learn more about our benefits in the US.At Autodesk, we're building a diverse workplace and an inclusive \n",
    "culture to give more people the chance to imagine, design, and make a better world. Autodesk is proud to be an \n",
    "equal opportunity employer and considers all qualified applicants for employment without regard to race, color, \n",
    "religion, age, sex, sexual orientation, gender, gender identity, national origin, disability, veteran status or any\n",
    "other legally protected characteristic. We also consider for employment all qualified applicants regardless of \n",
    "criminal histories, consistent with applicable law. Are you an existing contractor or consultant with Autodesk? . \n",
    "Please search for open jobs and apply internally (not on this external site). If you have any questions or require \n",
    "support, contact Autodesk Careers. Salary is one part of Autodesk's competitive package. For U.S.-based roles, we \n",
    "expect a starting base salary between $109,500 and $187,770. Offers are based on the candidate's experience and \n",
    "geographic location, and may exceed this range. In addition to base salaries, we also have a significant emphasis \n",
    "on annual cash bonuses, commissions for sales roles, stock grants, and a comprehensive benefits package. \n",
    "SummaryLocation:San Francisco, CA, USAType: Full timescale .Summary: The Business Analyst I possesses the fundamentals of analytical, strategic and project management skills. \n",
    "They need to have strong initiative, communication, and organizational skills to manage multiple project timelines.\n",
    "The Business Analyst I will support all business areas by bridging the technical knowhow with the operational \n",
    "expertise of the business owners. This position is key to understanding and documenting capabilities needed to \n",
    "address business challenges with technical solutions. The Business Analyst I will assist in requirements \n",
    "development by reviewing business processes and systems to identify and address operational efficiencies and \n",
    "improvements. This position will act as the liaison among internal business and technical stakeholders to analyze, \n",
    "document, communicate and validate business and system requirements for platform applications. Other duties as \n",
    "assigned. Business Analyst I: The Business Analyst I will act in a support role and be given project tasks, as \n",
    "overseen by the project lead. Reporting will be given at limited complexity as this role continues to build their \n",
    "familiarity with our business and data structure. Work is closely managed by the Business Intelligence Manager. \n",
    "Essential Duties and Responsibilities:Business Analyst I: Gather, organize, and create an execution plan for \n",
    "business and data requirements . Create reports, dashboards, and visualizations to understand business performance \n",
    ". Manage the day-to-day functions of data export jobs . Manage the cleanliness of master data and provide \n",
    "opportunities for training and better efficiencies . Recognize and adopt best practices in reporting and analysis: \n",
    "data integrity, test design, analysis, validation, and documentation . Coach, demonstrate, and uphold Friedman's \n",
    "Core Values . Maintain regular and dependable attendance and punctuality . Education/Experience: Minimum of 1-3 \n",
    "years business or data analytics experience . Bachelor's degree in a related field such as Data Science, Business \n",
    "Analytics, Statistics, Business Management, Economics, or Computer Science . ITIL or a Business Analyst \n",
    "Certification, a plus . Knowledge, Skills and Abilities: Intermediate Microsoft Suite, Word, Excel and PowerPoint \n",
    "Skills . Experience with reporting tools such as Power Bi . Ability to multitask across multiple lines and daily \n",
    "tasks . Experience working with ERP systems, such as Dynamics AX, D365 for F&O, Nav, a plus . Active listener with \n",
    "strong verbal & written communication skills . Self-starter who takes initiative . Detail-oriented and highly \n",
    "organized . Strong planning and strategic thinking . High Energy, Driven, Positive Attitude . Eagerness to learn, \n",
    "map & improve business processes . Excellent time management skills with a proven ability to meet deadlines and \n",
    "multi-task . Ability to work both independently and as part of a team, take initiative, and be proactive . Reliable\n",
    "work habits; accurate, efficient, proactive, and self-motivated . Strong organizational skills and detail-oriented \n",
    "with ability to prioritize multiple assignments . Dependable time management skills with the ability to and handle \n",
    "simultaneous tasks and responsibilities . Effectively respond to all situations using sound judgement and \n",
    "decision-making skills . What's in Friedman's toolbox for Team Members: 401(k) match up to 3% and 50 cents on the \n",
    "dollar for any amount greater than 3% up to 5% Medical, Dental and Vision bundled benefit plan . Team Member \n",
    "discount on all merchandise . Casual dress code . Tuition reimbursement to further career path . Friedman's Home \n",
    "Improvement is proud to be an Equal Opportunity Employer, committed to a diverse and inclusive work environment. \n",
    "Friedman's Home Improvement will consider for employment qualified applicants with criminal convictions in a manner\n",
    "consistent with AB 1008.SDL2017 .\"\"\"\n",
    "    print(clean_cleaned_text(str1))\n",
    "    "
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.10.5"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
